package com.bioroadlab.action;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.springframework.stereotype.Controller;

import com.bioroadlab.pojo.DiseaseCategory;

@Controller
@Results({ @Result(name = "toinsertSuccess", location = "insert.jsp", type = "dispatcher") })
public class DiseaseCategoryAction extends BaseAction {

	private static final long serialVersionUID = 1L;
	private String name;
	private DiseaseCategory diseaseCategory;

	@Override
	public String execute() throws Exception {
		return null;
	}

	@Action("toinsert")
	public String toInsert() {
		return "toinsertSuccess";
	}

	@Action("insert")
	public String insert() {
		getDiseaseCategoryService().saveDiseaseCategory(diseaseCategory);
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public DiseaseCategory getDiseaseCategory() {
		return diseaseCategory;
	}

	public void setDiseaseCategory(DiseaseCategory diseaseCategory) {
		this.diseaseCategory = diseaseCategory;
	}

}
